<% set_title(t("browse.#{@type}.title_html", :name => printable_element_name(@feature))) %>

<%= render "sidebar_header", :title => t("browse.#{@type}.title_html", :name => printable_element_name(@feature)) %>

<%= render :partial => "browse/#{@type}", :object => @feature %>

<% if @feature.visible? %>
  <div class='secondary-actions mb-3'>
    <%= link_to(t("browse.download_xml"), :controller => "api/#{@type.pluralize}", :action => :show) %>
    <% if current_user&.moderator? %>
      &middot;
      <%= link_to t("browse.view_unredacted_history"), :controller => "old_#{@type.pluralize}", :params => { :show_redactions => true } %>
    <% end %>
  </div>
<% end %>

<nav>
  <ol class="breadcrumb mb-1">
    <li class="breadcrumb-item active" aria-current="page">
      <%= tag.span t(@type, :scope => "browse.versions_navigation"), :class => "py-1 px-2 rounded bg-body-secondary" %>
    </li>
    <li class="breadcrumb-item">
      <%= link_to t("browse.versions_navigation.history"), :controller => "old_#{@type.pluralize}" %>
    </li>
    <li class="breadcrumb-item">
      <a href="#versions-navigation-active-page-item" class="numbered_pagination_link link-body-emphasis">
        <%= t "browse.versions_navigation.versions_label" %>
      </a>
    </li>
  </ol>

  <%= numbered_pagination(@feature.version, "versions-navigation-active-page-item", :active_page => @feature.version) do |v|
        { :href => { :controller => "old_#{@type.pluralize}", :action => :show, :version => v },
          :title => t("browse.versions_navigation.version", :version => v) }
      end %>
</nav>
